package com.wxapp.system.api.pojo.vm.city;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author lgl
 * @Description
 * @Datetime 2022/11/10 14:03
 * @Modified By
 */
@Data
public class PCityPageVm implements Serializable {
    /**
     * 子id
     */
    @Schema(description = "子id")
    private String id;
    /**
     * 父id
     */
    @Schema(description = "父pid")
    private String pid;
    /**
     * 名称
     */
    @Schema(description = "名称")
    private String name;
    /**
     * 代码
     */
    @Schema(description = "代码")
    private String code;
    /**
     * 创建时间
     */
    @Schema(description = "创建时间 ")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class) //反序列化时
    @JsonSerialize(using = LocalDateTimeSerializer.class) // 序列化时
    private LocalDateTime createTime;
}
